<?php
//ini_set("include_path", ".;..;");
error_reporting(E_ALL);

require_once 'PHPUnit/Framework.php';

function require_And_AddTestSuite($suite, $testName) {
	require_once ($testName . 'Test.php');
	//If possible, I want to find class name using filename by reflection
	//SeeAlso http://kr2.php.net/manual/en/language.oop5.php
	$suite->addTestSuite($testName . 'Test');
}
class AllTests {
	public static function suite() {
		$suite = new PHPUnit_Framework_TestSuite('PHPUnit');

		$testNames = array (
			'Array',
			//'MySQL',
			//'PDO',
			'Type',
			'String',
			//'Page',
			//'DBFinder'
		);

		foreach ($testNames as $testName)
			require_And_AddTestSuite($suite, $testName);
		return $suite;
	}
}

require_once 'PHPUnit/TextUI/TestRunner.php';
PHPUnit_TextUI_TestRunner::run(AllTests::suite());
?>